<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<div class="title">
	<s:a href="/admin/foodList.html" cssClass="parent fl"><s:text name="admin.foodList.title" /></s:a>
	<s:label cssClass="parent fl"  value=">" />
	<s:label cssClass="current fl" key="admin.foodEdit.title" />
	<s:a href="/admin/foodList.html" cssClass="back fr">[<s:text name="common.button.back" />]</s:a>
	<s:a action="foodDelete" cssClass="back pr5 fr">
		[<s:text name="admin.foodDelete.title" />]
		<s:param name="foodId" value="foodId"></s:param>
	</s:a>
	<span class="back pr5 fr">
		[<s:text name="admin.foodEdit.title" />]
	</span>
	<div class="clear"></div>
	<hr class="title" />
</div>
<s:form action="doFoodEdit" method="post" theme="simple" enctype="multipart/form-data">
	<s:hidden name="foodId" />
	<s:hidden name="restId" />
	<s:token />
	<div>
		<div class="fr cr ft w500">
			<div class="w300"></div>
		</div>
		<div class="clear table">
			<%-- 页面提示信息 --%>
			<div class="row">
				<div class="cell-label"></div>
				<div class="cell-text fieldError h30">
					<s:actionerror />
				</div>
			</div>
			<%-- 食品图片预览 --%>
			<div class="row">
				<div class="cell-label"><s:text name="admin.foodList.preview" />:</div>
				<div class="cell-text">
					<img alt="" src="<s:property value="foodDetailBean.picturePath" />" class="w240 h240" />
					<s:hidden name="foodDetailBean.picturePath" />
				</div>
				<div class="fieldError w300">
				</div>
			</div>
			<%-- 图片 --%>
			<div class="row">
				<div class="cell-label">
					<s:text name="admin.foodList.picture" />:
				</div>
				<div class="cell-text">
					<s:file name="foodPicture" cssClass="w176"></s:file>
					<s:submit name="upload" method="upload" key="common.button.upload" cssClass="smallbtn1 w60" />
				</div>
				<div class="fieldError w300">
					<s:fielderror fieldName="msg.picturePath" />
				</div>
			</div>
			<%-- 食品名 --%>
			<s:if test="restBean.langId1 != null && restBean.langId1 != 0">
				<div class="row">
					<div class="cell-label w80">
						<s:text name="admin.foodList.foodName" />(<s:property value="labelLang1" />):
					</div>
					<div class="cell-text w240">
						<s:textfield name="foodDetailBean.foodName1" cssClass="w240" />
					</div>
					<div class="fieldError w300">
						<s:fielderror fieldName="msg.foodName" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId2 != null && restBean.langId2 != 0">
				<div class="row">
					<div class="cell-label w80">
						<s:text name="admin.foodList.foodName" />(<s:property value="labelLang2" />):
					</div>
					<div class="cell-text w240">
						<s:textfield name="foodDetailBean.foodName2" cssClass="w240" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId3 != null && restBean.langId3 != 0">
				<div class="row">
					<div class="cell-label w80">
						<s:text name="admin.foodList.foodName" />(<s:property value="labelLang3" />):
					</div>
					<div class="cell-text w240">
						<s:textfield name="foodDetailBean.foodName3" cssClass="w240" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId4 != null && restBean.langId4 != 0">
				<div class="row">
					<div class="cell-label w80">
						<s:text name="admin.foodList.foodName" />(<s:property value="labelLang4" />):
					</div>
					<div class="cell-text w240">
						<s:textfield name="foodDetailBean.foodName4" cssClass="w240" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId5 != null && restBean.langId5 != 0">
				<div class="row">
					<div class="cell-label w80">
						<s:text name="admin.foodList.foodName" />(<s:property value="labelLang5" />):
					</div>
					<div class="cell-text w240">
						<s:textfield name="foodDetailBean.foodName5" cssClass="w240" />
					</div>
				</div>
			</s:if>
			<%-- 价格 --%>
			<div class="row">
				<div class="cell-label"><s:text name="admin.foodList.price" />:</div>
				<div class="cell-text">
					<s:textfield name="priceStr" cssClass="w240" />
				</div>
				<div class="fieldError w300">
					<s:fielderror fieldName="msg.pirce" />
				</div>
			</div>
			<%-- 最后更新人 --%>
			<div class="row">
				<div class="cell-label"><s:text name="common.label.updateUser" />:</div>
				<div class="cell-text">
					<s:textfield name="foodDetailBean.updateUserNickName" cssClass="w240" disabled="true" />
					<s:hidden name="foodDetailBean.updateUserNickName" />
				</div>
				<div class="fieldError w300">
				</div>
			</div>
			<%--最后更新时间 --%>
			<div class="row">
				<div class="cell-label"><s:text name="common.label.updateDate" />:</div>
				<div class="cell-text">
					<s:textfield name="foodDetailBean.updateDate" cssClass="w240" disabled="true">
						<s:param name="value"><s:date name="foodDetailBean.updateDate" format="%{#request.dateFormat}" /></s:param>
					</s:textfield>
					<s:hidden name="foodDetailBean.updateDate">
						<s:param name="value"><s:date name="foodDetailBean.updateDate" format="%{#request.dateFormat}" /></s:param>
					</s:hidden>
				</div>
				<div class="fieldError w300">
				</div>
			</div>
			<%-- 描述 --%>
			<s:if test="restBean.langId1 != null && restBean.langId1 != 0">
				<div class="row">
					<div class="cell-label w80 pt8">
						<s:text name="admin.foodList.description" />(<s:property value="labelLang1" />):
					</div>
					<div class="cell-text w240 pt8">
						<s:textarea name="foodDetailBean.description1" cssClass="w240 h60" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId2 != null && restBean.langId2 != 0">
				<div class="row">
					<div class="cell-label w80 pt8">
						<s:text name="admin.foodList.description" />(<s:property value="labelLang2" />):
					</div>
					<div class="cell-text w240 pt8">
						<s:textarea name="foodDetailBean.description2" cssClass="w240 h60" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId3 != null && restBean.langId3 != 0">
				<div class="row">
					<div class="cell-label w80 pt8">
						<s:text name="admin.foodList.description" />(<s:property value="labelLang3" />):
					</div>
					<div class="cell-text w240 pt8">
						<s:textarea name="foodDetailBean.description3" cssClass="w240 h60" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId4 != null && restBean.langId4 != 0">
				<div class="row">
					<div class="cell-label w80 pt8">
						<s:text name="admin.foodList.description" />(<s:property value="labelLang4" />):
					</div>
					<div class="cell-text w240 pt8">
						<s:textarea name="foodDetailBean.description4" cssClass="w240 h60" />
					</div>
				</div>
			</s:if>
			<s:if test="restBean.langId5 != null && restBean.langId5 != 0">
				<div class="row">
					<div class="cell-label w80 pt8">
						<s:text name="admin.foodList.description" />(<s:property value="labelLang5" />):
					</div>
					<div class="cell-text w240 pt8">
						<s:textarea name="foodDetailBean.description5" cssClass="w240 h60" />
					</div>
				</div>
			</s:if>
			<div class="row">
				<div class="cell-label"></div>
				<div class="cell-button">
					<s:submit name="save" method="save" key="common.button.save" cssClass="button3" />
				</div>
				<div class="fieldError w300">
				</div>
			</div>
		</div>
	</div>
	<div class="clear"></div>
</s:form>